package com.ubo.uspeed;

import com.ubo.java.associations.EAssociationType;

public class Association {
	/**
	 * nom de l'association
	 */
	protected String mName;
	/**
	 * Nom de la source
	 */
	protected AAssociationElement mSource;
	/**
	 * Nom du destinataire
	 */
	protected AAssociationElement mDestination;
	/**
	 * Type de l'association
	 */
	protected EAssociationType mType;
	/**
	 * Cardinalité de la source
	 */
	protected String mSCard;
	/**
	 * Cardinalité de la destination
	 */
	protected String mDCard;

	/**
	 * 
	 * @param n
	 * @param s
	 * @param d
	 * @param at
	 * @param sc
	 * @param dc
	 */
	public Association(String n, AAssociationElement s, AAssociationElement d,
			EAssociationType at, String sc, String dc) {
		this.mName = n;
		this.mSource = s;
		this.mDestination = d;
		this.mType = at;
		this.mSCard = sc;
		this.mDCard = dc;
	}

	/**
	 * 
	 * @param n
	 */
	public Association(String n) {
		this.mName = n;
	}

	/**
	 * 
	 * @return
	 */
	public String getmSCard() {
		return mSCard;
	}

	/**
	 * 
	 * @param mSCard
	 */
	public void setmSCard(String mSCard) {
		this.mSCard = mSCard;
	}

	/**
	 * 
	 * @return
	 */
	public String getmDCard() {
		return mDCard;
	}

	/**
	 * 
	 * @param mDCard
	 */
	public void setmDCard(String mDCard) {
		this.mDCard = mDCard;
	}

	/**
	 * 
	 * @return
	 */
	public String getmName() {
		return mName;
	}

	/**
	 * 
	 * @param mName
	 */
	public void setmName(String mName) {
		this.mName = mName;
	}

	/**
	 * 
	 * @return
	 */
	public AAssociationElement getmSource() {
		return mSource;
	}

	/**
	 * 
	 * @param mSource
	 */
	public void setmSource(Classifier mSource) {
		this.mSource = mSource;
	}

	/**
	 * 
	 * @return
	 */
	public AAssociationElement getmDestination() {
		return mDestination;
	}

	/**
	 * 
	 * @param mDestination
	 */
	public void setmDestination(Classifier mDestination) {
		this.mDestination = mDestination;
	}

	/**
	 * 
	 * @return
	 */
	public EAssociationType getmType() {
		return mType;
	}

	/**
	 * 
	 * @param mType
	 */
	public void setmType(EAssociationType mType) {
		this.mType = mType;
	}

	/**
	 * 
	 * @param v
	 */
	public void accept(Visiteur v) {
		v.visitAssociation(this);
	}

}
